<template>
  <div>
    <el-carousel :interval="5000" arrow="always" height="200px">
      <el-carousel-item v-for="item in this.url.topnews">
         <el-image :src="'http://192.168.1.109:8080/web_home' + item.topimage"></el-image>
      </el-carousel-item>
    </el-carousel>

    <ul v-for="item in  this.url.news">
    <ListCpn @getHtmlData = "getHtmlData" :imageSrc="item.listimage" :title="item.title" :content="item.pubdate" :htmlSrc="item.url" :baseSrc="'http://192.168.1.109:8080/web_home'"></ListCpn>

    </ul>
  </div>
</template>

<script>
  import ListCpn from "./newList/ListCpn.vue"
  export default {
    name: "banner",
    components:{
      ListCpn
    },
    props: {
      url: {
        type: Object
      }
    },
    data() {
      return {
      }
    },
    methods: {
      clog() {

        console.log(this.url);
      },
      getHtmlData(src) {
         this.$emit("getHtmlData",src);
      }
    }

  }
</script>

<style>
  .el-carousel__item h3 {
    color: #475669;
    font-size: 18px;
    opacity: 0.75;
    line-height: 300px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }


</style>
